package org.example4;

public class GenericObject<K, V> {

    private K key;
    private V value;

    public GenericObject() {
        if (key == null || value == null) {
            key = (K) "defaultKey";
            value = (V) Integer.decode("123");
        }
    }

    public GenericObject(K key, V value) {
            this.key = key;
            this.value = value;
    }

    public K getKey() {
        return key;
    }

    public V getValue() {
        return value;
    }
}
